package com.szholly.pro.watergas_server.ps.data;

import java.util.HashMap;

import com.szholly.data.general.metadata.table.DefulatDomainTable;
import org.springframework.stereotype.Component;

import com.szholly.data.general.Field;
import com.szholly.data.general.InterceptorTableBase;
import com.szholly.data.general.metadata.IBaseTable;
import com.szholly.utils.spring.SpringBeanFactory;
import org.springframework.stereotype.Component;
import com.szholly.data.general.GlobalDataType;
import com.szholly.data.general.RowBase;


/**
 * MonitorDataCertificateFile
 */
@Component("MonitorDataCertificateFile")
public class MonitorDataCertificateFileTable extends InterceptorTableBase  implements IBaseTable{

	public final static String TABLE_NAME = "MONITOR_DATA_CERTIFICATE_FILE";
	
	/**
	 * single ref
	 */
	public static MonitorDataCertificateFileTable getSingleRef() {
		return (MonitorDataCertificateFileTable) SpringBeanFactory.getBean("MonitorDataCertificateFile");
	}

	@Override
	public String getMetadataTableName() {
		return TABLE_NAME;
	}

	@Override
	public String getMetadataTableAliasName() {
		return "MonitorDataCertificateFile";
	}

	private HashMap<String, Field> fields;

	@Override
	protected HashMap<String, Field> fields() {
		if (fields == null) {
			fields = new HashMap<String, Field>();

			Field itemField = null;
			
			itemField = new Field();
			itemField.setFieldName(MonitorDataCertificateFileRow.FIELD_Guid);
			itemField.setDataType(GlobalDataType.String);
			itemField.setFieldID(5);
			itemField.setFieldAliasName("GUID");
			itemField.setAllowNull(true);
			itemField.setMaxLen(100);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
			itemField = new Field();
			itemField.setFieldName(MonitorDataCertificateFileRow.FIELD_CertificateId);
			itemField.setDataType(GlobalDataType.String);
			itemField.setFieldID(6);
			itemField.setFieldAliasName("凭证ID");
			itemField.setAllowNull(true);
			itemField.setMaxLen(100);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
			itemField = new Field();
			itemField.setFieldName(MonitorDataCertificateFileRow.FIELD_FilePath);
			itemField.setDataType(GlobalDataType.String);
			itemField.setFieldID(7);
			itemField.setFieldAliasName("凭证文件");
			itemField.setAllowNull(false);
			itemField.setMaxLen(510);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
		}
		return fields;
	}

	@Override
	public String getTableGroup() {
		return "MonitorDataCertificateFile";
	}
}